package com.ellecity06.cwhiskymall.adapter

import android.view.LayoutInflater
import android.view.ViewGroup
import com.ellecity06.common.base.BaseAdapter
import com.ellecity06.common.ktx.load
import com.ellecity06.cwhiskymall.bean.GoodImageBean
import com.ellecity06.cwhiskymall.databinding.ItemPosterIamgeBinding

/**
 * @author ellecity06
 * @time 2024/11/5 18:09
 * @des
 */
class PosterImageAdapter : BaseAdapter<GoodImageBean, ItemPosterIamgeBinding>() {
    override fun inflateBinding(
        layoutInflater: LayoutInflater, parent: ViewGroup, viewType: Int
    ): ItemPosterIamgeBinding {
        return ItemPosterIamgeBinding.inflate(layoutInflater, parent, false)
    }

    override fun convert(binding: ItemPosterIamgeBinding, position: Int, item: GoodImageBean) {
        binding.ivGood.load(context, item.image)
    }
}